Component({
  data: {
    selected: 0,
    color: "#7A7E83",
    selectedColor: "#333333",
    list: [{
      pagePath: "/pages/tab/index",
      iconPath: "/image/tab/square.png",
      selectedIconPath: "/image/tab/selectedSquare.png",
      text: "设备"
    },{
      "pagePath": "/pages/tab/index2",
      "iconPath": "/image/tab/index.png",
      "selectedIconPath": "/image/tab/selectedIndex.png",
      // "text": "设备"
    }, {
      pagePath: "/pages/tab/user",
      iconPath: "/image/tab/member.png",
      selectedIconPath: "/image/tab/selectedMember.png",
      text: "我的"
    }]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      const url = data.path
      wx.switchTab({url})
      // console.log('tab栏点击',data);
      this.setData({
        selected: data.index
      })
    }
  }
})